<!DOCTYPE html>
<html  xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0, user-scalable=0, minimum-scale=1.0,maximum-scale=1.0" />
<!-- jquery库 -->
		  <script type="text/javascript" src="../common/meta.js"></script>
		<script src="shopCart.js"></script>
		<script type="text/javascript" src="./cache.js"></script>
<script>

function setMin(price,id){
	$("#text_box"+id).val(parseInt($("#text_box"+id).val())-1);
	        if (parseInt($("#text_box"+id).val())<=1){	
	        	$(window).mobileMsgBox({msgText:"数量不能再减啦！",delayTime:500});		
	        	$("#text_box"+id).val(1);
	        }
	setTotal(price,id);
}
function setMax(price,id){
	$("#text_box"+id).val(parseInt($("#text_box"+id).val())+1);

	setTotal(price,id);
}
function setTotal(prcie,id){
	$("#sum_"+id).html(prcie*$("#text_box"+id).val());
}

</script> 
<style type="text/css">
	.ui-body-c, .ui-overlay-c {
    	background: none;
    	color: #333;
	}
	table th{
    	background-color: #49afcd;
    	color:#fff;
    }
    .panel{
   		margin:10px;
   		border:1px solid;
   		border-color: gray;
   		padding: 2px;
   		border-radius:8px;
   	}	
   	.home{
	 	margin-top:5px;
	 	float:right;
	 }
	.ui-header .ui-title{
	    font-size: 18px;
	} 
           ul, ol {
			margin: 0 0 0px 0px;
			padding: 0;
		}
         .back{
		 	margin-top:5px;
             float:left;
		 }
</style>
</head>
<body>

<div id="shopCartview" data-role="page" data-dom-cache="true" class="bodyframe">
	<div data-role="header" class=" theme-info" >
        <ul class="back">
	   		<a   href="personalSetting.html"><image src='../image/left_48.png'></image></a>
	   	</ul>
		<ul class="home">
		   		<a  id="home" ><image src='../image/home_48.ico'></image></a>
		   	</ul>
			
		<h1>购物车</h1>
   </div>	
    
		<div class="row-fluid" style="margin-bottom:20px;">
		<div class="panel">
			 <table id="gridPage" class="table table-bordered " data-role="gridtable" data-settings="{pageSize:10,currentPageIndex:1,server:localStorage['APP_AJAX_PATH']+'/drinkingBar/view/shopCart.jsp.findShopCartByUserId',autoload:true}">
				<thead>
					<tr>
						<th class="checkbox" ></th>
						<th class="formatter-name" width="">名称</th>
						<th class="formatter-price" width="16%">单价</th>
						<th class="formatter-quantity" width="34%">数量</th>
						<th class="formatter-sum" width="16%">合计</th>
				    </tr>
				</thead>
 				<tbody >
       			<!-- grid单元模板 -->
					<tr class='grid_tr_templete' >
                         <td></td>
                         <td></td>
                         <td></td>
                         <td></td>
                         <td></td>
                     </tr>
 				</tbody>
			</table>
		    <div class="row-fluid" >
	        	<button type="button" class="btn" id="deleteShopCart">删除</button>
	        	<button type="button" class="btn" id="buyShopCart" >结算</button>
        	</div>
        </div>
	</div>
</div>
       
</body>

</html>